package com.qingke.hibernate.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="select_course")
//@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class SelectCourse {
	@Id
	@Column(name="id")
	private int id;
	
	@ManyToOne
	@JoinColumn(name="course_set_id")
	private CourseSet courseSet;
	
	@ManyToOne
	@JoinColumn(name="student_id")
	private Student student;
	
	@OneToOne
	@JoinColumn(name="score_id")
	private Score score;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public CourseSet getCourseSet() {
		return courseSet;
	}

	public void setCourseSet(CourseSet courseSet) {
		this.courseSet = courseSet;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Score getScore() {
		return score;
	}

	public void setScore(Score score) {
		this.score = score;
	}

	@Override
	public String toString() {
		return "SelectCourse [id=" + id + ", courseSet=" + courseSet + ", student=" + student + ", score=" + score
				+ "]";
	}
	
	
	
}
